import Layout from '@/layout'

const productRouter = {
  path: '/product',
  name: 'product-group',
  component: Layout,
  meta: { title: '货品报表', icon: 'tree', roles: ['m7400'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/product-group/day'], resolve),
      name: 'ProductDayManage',
      remoteParam: { serviceName: 'warehouse', path: '/api/statistics/product/day/' },
      remoteUrl: '',
      meta: { title: '货品日报', roles: ['m7410'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/product-group/month'], resolve),
      name: 'ProductMonthManage',
      remoteParam: { serviceName: 'warehouse', path: '/api/statistics/product/month/' },
      remoteUrl: '',
      meta: { title: '货品月报', roles: ['m7420'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/product-group/year'], resolve),
      name: 'ProductYearManage',
      remoteParam: { serviceName: 'warehouse', path: '/api/statistics/product/year/' },
      remoteUrl: '',
      meta: { title: '货品年报', roles: ['m7430'] }
    }
  ]
}

export default productRouter
